package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.domain.Reservation;
import com.zzyl.nursing.vo.ReservationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface MemberReservationMapper   {

    void insertReservationInfo(Reservation dto);

    List<ReservationVo> selectReservationAll(@Param("status") Integer status, @Param("userId") Long userId);

    void updateReservationStatus(@Param("id") Long id, @Param("userId") Long userId);

    Integer getCancelledReservationCount(@Param("userId") Long userId, @Param("start") LocalDateTime start, @Param("end") LocalDateTime end);

    List<Map<String, Object>> countReservationsByTimeSlots(@Param("timeSlots")List<String> timeSlots);


    List<Reservation> selectAllReservateionInfo();

    void updateById(Reservation reservation);
}
